<template>
  <!-- 任务分配 -->
  <div class="distributeTask">
    <Shop v-if="customerType()===2" />
    <Client v-if="customerType()===1" />
    <Import v-if="customerType()===0" />
  </div>
</template>
<script>
import Shop from './distributeChild/Shop'
import Client from './distributeChild/Client'
import Import from './distributeChild/Import'

import { mapState } from 'vuex'
export default {
  name: 'DistributeTask',
  components: {
    Shop,
    Client,
    Import
  },
  data() {
    return {
    }
  },
  computed: {
    ...mapState({
      formData: function(state) {
        return state.taskForm.form[this.$route.query.id] ? state.taskForm.form[this.$route.query.id].basic : ''
      },
      step: function(state) {
        return state.taskForm.form[this.$route.query.id] ? state.taskForm.form[this.$route.query.id].step : 1
      }
    })
  },
  methods: {
    customerType() {
      return this.formData ? this.formData.objectMethod : 1
    }
  }
}
</script>
<style lang='scss' module>
</style>
